|
Vega Strike
0.8.x
|
unit.h More...
#include <unit.h>


Classes | |
| struct | XML |
Public Types | |
| enum | Names { UNKNOWN, UNIT, SCALE, MESHFILE, XFILE } |
| enum | Damages { NO_DAMAGE = 0x0, SHIELD_DAMAGED = 0x1, COMPUTER_DAMAGED = 0x2, MOUNT_DAMAGED = 0x4, CARGOFUEL_DAMAGED = 0x8, JUMP_DAMAGED = 0x10, CLOAK_DAMAGED = 0x20, LIMITS_DAMAGED = 0x40, ARMOR_DAMAGED = 0x80 } |
| enum | schedulepriorityenum { scheduleDefault, scheduleAField, scheduleRoid } |
| enum | INVIS { DEFAULTVIS = 0x0, INVISGLOW = 0x1, INVISUNIT = 0x2, INVISCAMERA = 0x4 } |
| enum | COLLIDELOCATIONTYPES { UNIT_ONLY = 0, UNIT_BOLT = 1, NUM_COLLIDE_MAPS = 2 } |
| enum | tractorHow { tractorImmune = 0, tractorPush = 1, tractorIn = 2, tractorBoth = 3 } |
| enum | DOCKENUM { NOT_DOCKED = 0x0, DOCKED_INSIDE = 0x1, DOCKED = 0x2, DOCKING_UNITS = 0x4 } |
Public Member Functions | |
| Unit (bool kill) | |
| void | Kill () |
| bool | Killed () |
| void | Ref () |
| void | UnRef () |
| Unit (const Unit &)=delete | |
| Unit & | operator= (const Unit &)=delete |
| Unit () | |
| ~Unit () override | |
| Unit (int dummy) | |
| Default constructor. More... | |
| Unit (std::vector< Mesh *> &meshes, bool Subunit, int faction) | |
| Constructor that creates aa mesh with meshes as submeshes (number of them) as either as subunit with faction faction. More... | |
| Unit (const char *filename, bool SubUnit, int faction, std::string customizedUnit=std::string(""), Flightgroup *flightgroup=NULL, int fg_subnumber=0) | |
| Constructor that creates a mesh from an XML file If it is a customizedUnit, it will check in that directory in the home dir for the unit. More... | |
| void | Init () |
| void | Init (const char *filename, bool SubUnit, int faction, std::string customizedUnit=std::string(""), Flightgroup *flightgroup=NULL, int fg_subnumber=0) |
| void | LoadRow (class CSVRow &row, std::string unitMod, bool saved_game) |
| bool | UpgradeSubUnitsWithFactory (const Unit *up, int subunitoffset, bool touchme, bool downgrade, int &numave, double &percentage, Unit *(*createupgradesubunit)(std::string s, int faction)) |
| bool | UpgradeSubUnits (const Unit *up, int subunitoffset, bool touchme, bool downgrade, int &numave, double &percentage) |
| bool | UpgradeMounts (const Unit *up, int subunitoffset, bool touchme, bool downgrade, int &numave, const Unit *templ, double &percentage) |
| bool | hasSubUnits () const |
| Contains information about a particular Mount on a unit. More... | |
| un_iter | getSubUnits () |
| un_kiter | viewSubUnits () const |
| bool | isSubUnit () const |
| void | setFaceCamera () |
| bool | UpAndDownGrade (const Unit *up, const Unit *templ, int mountoffset, int subunitoffset, bool touchme, bool downgrade, int additive, bool forcetransaction, double &percentage, const Unit *downgrade_min, bool force_change_on_nothing, bool gen_downgrade_list) |
| void | ImportPartList (const std::string &category, float price, float pricedev, float quantity, float quantdev) |
| void | ClearMounts () |
| virtual void | UpgradeInterface (Unit *base) |
| bool | canUpgrade (const Unit *upgrador, int mountoffset, int subunitoffset, int additive, bool force, double &percentage, const Unit *templ=NULL, bool force_change_on_nothing=false, bool gen_downgrade_list=true) |
| bool | Upgrade (const Unit *upgrador, int mountoffset, int subunitoffset, int additive, bool force, double &percentage, const Unit *templ=NULL, bool force_change_on_nothing=false, bool gen_downgrade_list=true) |
| int | RepairCost () |
| int | RepairUpgrade () |
| bool | RepairUpgradeCargo (Cargo *item, Unit *baseUnit, float *credits) |
| Vector | MountPercentOperational (int whichmount) |
| bool | ReduceToTemplate () |
| double | Upgrade (const std::string &file, int mountoffset, int subunitoffset, bool force, bool loop_through_mounts) |
| bool | canDowngrade (const Unit *downgradeor, int mountoffset, int subunitoffset, double &percentage, const Unit *downgradelimit, bool gen_downgrade_list=true) |
| bool | Downgrade (const Unit *downgradeor, int mountoffset, int subunitoffset, double &percentage, const Unit *downgradelimit, bool gen_downgrade_list=true) |
| unsigned char | getAttackPreferenceChar () |
| unsigned char | getUnitRoleChar () |
| unsigned char | getAttackPreferenceChar () const |
| unsigned char | getUnitRoleChar () const |
| void | setCombatRole (const std::string &s) |
| const std::string & | getCombatRole () const |
| const std::string & | getUnitRole () const |
| void | setUnitRole (const std::string &s) |
| const std::string & | getAttackPreference () const |
| void | setAttackPreference (const std::string &s) |
| void | DamageRandSys (float dam, const Vector &vec, float randum=1, float degrees=1) |
| void | SetNebula (Nebula *) |
| Nebula * | GetNebula () const |
| const std::string & | getCockpit () const |
| class Cockpit * | GetVelocityDifficultyMult (float &) const |
| void | RemoveFromSystem () |
| void | RequestPhysics () |
| virtual void | Split (int level) |
| virtual void | addHalo (const char *filename, const Matrix &trans, const Vector &size, const GFXColor &col, std::string halo_type, float activation) |
| std::vector< Mesh * > | StealMeshes () |
| bool | Explode (bool draw, float timeit) |
| std::string | drawableGetName () override |
| virtual void | applyTechniqueOverrides (const std::map< std::string, std::string > &overrides) |
| bool | TransferUnitToSystem (unsigned int whichJumpQueue, StarSystem *&previouslyActiveStarSystem, bool DoSightAndSound) override |
| void | SwitchCombatFlightMode () |
| bool | CombatMode () |
| Computer & | GetComputerData () |
| const Computer & | ViewComputerData () const |
| void | beginElement (const std::string &name, const XMLSupport::AttributeList &attributes) |
| void | endElement (const std::string &name) |
| void | WriteUnit (const char *modificationname="") |
| std::string | WriteUnitString () |
| void | LoadXML (const char *filename, const char *unitModifications="", std::string *xmlbuffer=NULL) |
| void | LoadXML (VSFileSystem::VSFile &f, const char *unitModifications="", std::string *xmlbuffer=NULL) |
| QVector | realPosition () override |
| void | UpdatePhysics2 (const Transformation &trans, const Transformation &old_physical_state, const Vector &accel, float difficulty, const Matrix &transmat, const Vector &CumulativeVelocity, bool ResolveLast, UnitCollection *uc=NULL) override |
| Updates physics given unit space transformations and if this is the last physics frame in the current gfx frame. More... | |
| void | ActTurn () |
| void | UpdateCloak () |
| void | UpdatePhysics3 (const Transformation &trans, const Matrix &transmat, bool lastframe, UnitCollection *uc, Unit *superunit) override |
| bool | isPlayerShip () override |
| Vector | LocalCoordinates (const Unit *un) const |
| float | CloakVisible () const |
| virtual void | Cloak (bool cloak) |
| void | Kill (bool eraseFromSave=true, bool quitting=false) |
| bool | Killed () const |
| bool | IsExploding () const |
| float | ExplodingProgress () const |
| Vector | ResolveForces (const Transformation &, const Matrix &) override |
| Resolves forces of given unit on a physics frame. More... | |
| float | rSize () const |
| QVector | Position () const |
| const Matrix & | GetTransformation () const |
| QVector | LocalPosition () const |
| void | SetCurPosition (const QVector &pos) |
| Sets the cumulative transformation matrix's position...for setting up to be out in the middle of nowhere. More... | |
| void | SetPosAndCumPos (const QVector &pos) |
| void | SetVisible (bool isvis) |
| void | SetAllVisible (bool isvis) |
| void | SetGlowVisible (bool isvis) |
| void | FireEngines (const Vector &Direction, float FuelSpeed, float FMass) |
| Fire engine takes a unit vector for direction and how fast the fuel speed and mass coming out are. More... | |
| void | ApplyForce (const Vector &Vforce) |
| void | ApplyLocalForce (const Vector &Vforce) |
| void | Accelerate (const Vector &Vforce) |
| void | ApplyTorque (const Vector &Vforce, const QVector &Location) |
| void | ApplyLocalTorque (const Vector &Vforce, const Vector &Location) |
| void | ApplyBalancedLocalTorque (const Vector &Vforce, const Vector &Location) |
| void | ApplyLocalTorque (const Vector &torque) |
| float | ApplyLocalDamage (const Vector &pnt, const Vector &normal, Damage damage, Unit *affectedSubUnit, const GFXColor &) |
| void | ApplyNetDamage (Vector &pnt, Vector &normal, float amt, float ppercentage, float spercentage, GFXColor &color) |
| Vector | ClampThrust (const Vector &thrust, bool afterburn) |
| Vector | MaxThrust (const Vector &thrust) |
| virtual void | Thrust (const Vector &amt, bool afterburn=false) |
| void | LateralThrust (float amt) |
| void | VerticalThrust (float amt) |
| void | LongitudinalThrust (float amt) |
| Vector | ClampVelocity (const Vector &velocity, const bool afterburn) |
| Vector | ClampAngVel (const Vector &vel) |
| Vector | ClampTorque (const Vector &torque) |
| Vector | MaxTorque (const Vector &torque) |
| void | YawTorque (float amt) |
| void | PitchTorque (float amt) |
| void | RollTorque (float amt) |
| void | Repair () |
| virtual void | UpdateSubunitPhysics (const Transformation &trans, const Matrix &transmat, const Vector &CumulativeVelocity, bool ResolveLast, UnitCollection *uc, Unit *superunit) |
| virtual void | UpdateSubunitPhysics (Unit *subunit, const Transformation &trans, const Matrix &transmat, const Vector &CumulativeVelocity, bool ResolveLast, UnitCollection *uc, Unit *superunit) |
| bool | InRange (const Unit *target, bool cone=true, bool cap=true) const |
| bool | InRange (const Unit *target, double &mm, bool cone, bool cap, bool lock) const |
| Unit * | Target () |
| const Unit * | Target () const |
| Unit * | VelocityReference () |
| const Unit * | VelocityReference () const |
| Unit * | Threat () |
| void | VelocityReference (Unit *targ) |
| void | TargetTurret (Unit *targ) |
| void | Threaten (Unit *targ, float danger) |
| void | ResetThreatLevel () |
| float | cosAngleTo (Unit *target, float &distance, float speed=0.001, float range=0.001, bool turnmargin=true) const |
| float | cosAngleFromMountTo (Unit *target, float &distance) const |
| float | computeLockingPercent () |
| void | Select () |
| void | Deselect () |
| void | Target (Unit *targ) |
| void | setTargetFg (std::string primary, std::string secondary=std::string(), std::string tertiary=std::string()) |
| void | ReTargetFg (int which_target=0) |
| void | SetCollisionParent (Unit *name) |
| void | SetOwner (Unit *target) |
| void | SetRecursiveOwner (Unit *target) |
| Unit * | rayCollide (const QVector &st, const QVector &end, Vector &normal, float &distance) |
| void | calculate_extent (bool update_collide_queue) |
| bool | Inside (const QVector &position, const float radius, Vector &normal, float &dist) |
| void | UpdateCollideQueue (StarSystem *ss, CollideMap::iterator hint[NUM_COLLIDE_MAPS]) |
| bool | querySphere (const QVector &pnt, float err) const |
| float | querySphere (const QVector &start, const QVector &end, float my_unit_radius=0) const |
| float | querySphereNoRecurse (const QVector &start, const QVector &end, float my_unit_radius=0) const |
| float | querySphereClickList (const QVector &st, const QVector &dir, float err) const |
| bool | queryFrustum (double frustum[6][4]) const |
| Updates the collide Queue with any possible change in sectors Queries if this unit is within a given frustum. More... | |
| bool | querySphereClickList (int, int, float err, Camera *activeCam) const |
| Queries the bounding sphere with a duo of mouse coordinates that project to the center of a ship and compare with a sphere...pretty fast queries the sphere for weapons (world space point) Only in Unit class. More... | |
| bool | InsideCollideTree (Unit *smaller, QVector &bigpos, Vector &bigNormal, QVector &smallpos, Vector &smallNormal, bool bigasteroid=false, bool smallasteroid=false) |
| bool | jumpReactToCollision (Unit *smaller) |
| bool | Collide (Unit *target) |
| void | CollideAll () |
| int | CanDockWithMe (Unit *dockingunit, bool forcedock=false) |
| int | ForceDock (Unit *utdw, unsigned int whichdockport) |
| void | PerformDockingOperations () |
| void | FreeDockingPort (unsigned int whichport) |
| const std::vector< struct DockingPorts > & | DockingPortLocations () const |
| char | DockedOrDocking () const |
| bool | IsCleared (const Unit *dockignunit) const |
| bool | isDocked (const Unit *dockingUnit) const |
| bool | UnDock (Unit *unitToDockWith) |
| bool | RequestClearance (Unit *dockingunit) |
| returns -1 if unit cannot dock, otherwise returns which dock it can dock at More... | |
| bool | EndRequestClearance (Unit *dockingunit) |
| bool | hasPendingClearanceRequests () const |
| int | Dock (Unit *unitToDockWith) |
| void | RestoreGodliness () |
| void | SetFg (Flightgroup *fg, int fg_snumber) |
| void | SetFaction (int faction) |
| Flightgroup * | getFlightgroup () const |
| int | getFgSubnumber () const |
| const std::string | getFgID () |
| std::vector< class CargoColor > & | FilterDowngradeList (std::vector< class CargoColor > &mylist, bool downgrade=true) |
| std::vector< class CargoColor > & | FilterUpgradeList (std::vector< class CargoColor > &mylist) |
| bool | IsBase () const |
| bool | isTractorable (enum tractorHow how=tractorBoth) const |
| void | setTractorability (enum tractorHow how) |
| enum tractorHow | getTractorability () const |
| void | setFullname (std::string name) |
| const string & | getFullname () const |
| const string & | getFilename () const |
| virtual enum Vega_UnitType | isUnit () const |
| void | Ref () |
| void | UnRef () |
| UnitImages< void > & | GetImageInformation () |
| bool | isStarShip () const |
| bool | isPlanet () const |
| bool | isJumppoint () const |
| void | TurretFAW () |
| void | Fire (unsigned int bitmask, bool beams_target_owner=false) |
| void | getAverageGunSpeed (float &speed, float &grange, float &mrange) const |
| int | getNumMounts () const |
| int | LockMissile () const |
| void | LockTarget (bool myboo) |
| QVector | PositionITTS (const QVector &firingposit, Vector firingvelocity, float gunspeed, bool smooth_itts) const |
| void | SelectAllWeapon (bool Missile) |
| void | setAverageGunSpeed () |
| bool | TargetLocked (const Unit *checktarget=nullptr) const |
| bool | TargetTracked (const Unit *checktarget=nullptr) |
| void | ToggleWeapon (bool Missile, bool forward=true) |
| float | TrackingGuns (bool &missileLock) |
| void | UnFire () |
| void | addDefaultSounds () |
| void | addSounds (std::string(*nextElement)(std::string &), std::string soundsString) |
| void | addSound (std::string soundString, SoundType type) |
| void | adjustSound (SoundType type) |
| void | adjustSound (SoundType type, const QVector &position, const Vector &velocity) |
| void | playSound (SoundType type) |
| void | playShieldDamageSound (const Vector &pnt) |
| void | playArmorDamageSound (const Vector &pnt) |
| void | playHullDamageSound (const Vector &pnt) |
| bool | DrawableInit (const char *filename, int faction, Flightgroup *flightgrp=NULL, const char *animationExt=NULL) |
| void | AnimationStep () |
| void | clear () |
| string | getAnimationName (unsigned int animationNumber) const |
| unsigned int | getAnimationNumber (const char *name) const |
| void | ChangeAnimation (const char *name) |
| void | ChangeAnimation (unsigned int AnimNumber) |
| void | StartAnimation (unsigned int how_many_times=0, int numAnimation=0) |
| void | StopAnimation () |
| bool | isAnimatedMesh () const |
| bool | animationRuns () const |
| unsigned int | numAnimations () |
| bool | isContinuousLoop () const |
| void | addAnimation (std::vector< Mesh *> *meshes, const char *name) |
| double | framesPerSecond () const |
| double | timePerFrame () const |
| void | ToggleAnimatedMesh (bool on) |
| void | SetAniSpeed (float speed) |
| virtual void | Draw (const Transformation &quat=identity_transformation, const Matrix &m=identity_matrix) |
| virtual void | DrawNow (const Matrix &m=identity_matrix, float lod=1000000000) |
| Draws this unit with the transformation and matrix (should be equiv) separately. More... | |
| void | Sparkle (bool on_screen, Matrix *ctm) |
| Drawable::Sparkle caused damaged units to emit sparks. More... | |
| void | DrawHalo (bool on_screen, float apparent_size, Matrix wmat, int cloak) |
| void | DrawSubunits (bool on_screen, Matrix wmat, int cloak, float average_scale, unsigned char char_damage) |
| unsigned int | nummesh () const |
| void | LightShields (const Vector &pnt, const Vector &normal, float amt, const GFXColor &color) |
| Matrix | WarpMatrix (const Matrix &ctm) const |
| Holds temporary values for inter-function XML communication Saves deprecated restr info. More... | |
| void | UpdateHudMatrix (int whichcam) |
| Sets the camera to be within this unit. More... | |
| VSSprite * | getHudImage () const |
| const float | GetHull () const |
| const float | GetArmor (int facet=0) const |
| const float | GetShield (int facet=0) const |
| DamageableLayer & | GetHullLayer () |
| DamageableLayer & | GetArmorLayer () |
| DamageableLayer & | GetShieldLayer () |
| const float | GetShieldRegeneration () const |
| virtual const float | GetHullPercent () const |
| virtual const float | GetShieldPercent () const |
| void | ArmorData (float armor[8]) const |
| bool | ShieldUp (const Vector &) const |
| float | DealDamageToShield (const Vector &pnt, float &Damage) |
| float | DealDamageToHull (const Vector &pnt, float Damage) |
| void | ApplyDamage (const Vector &pnt, const Vector &normal, Damage damage, Unit *affected_unit, const GFXColor &color, void *ownerDoNotDereference) |
| void | DamageRandomSystem (InflictedDamage inflicted_damage, bool player, Vector attack_vector) |
| void | DamageCargo (InflictedDamage inflicted_damage) |
| void | Destroy () |
| float | FShieldData () const |
| float | RShieldData () const |
| float | LShieldData () const |
| float | BShieldData () const |
| void | leach (float XshieldPercent, float YrechargePercent, float ZenergyPercent) |
| float | MaxShieldVal () const |
| void | RegenerateShields (const float difficulty, const bool player_ship) |
| bool | flickerDamage () |
| InflictedDamage | DealDamage (const CoreVector &attack_vector, Damage &damage) |
| bool | Destroyed () |
| void | decreaseWarpEnergy (bool insys, float time) |
| void | DecreaseWarpEnergyInWarp () |
| float | energyData () const |
| float | energyRechargeData () const |
| float | fuelData () const |
| void | WCWarpIsFuelHack (bool transfer_warp_to_fuel) |
| Energetic::WCWarpIsFuelHack - in Wing Commander, warp and fuel are the same variable. More... | |
| float | ExpendMomentaryFuelUsage (float magnitude) |
| float | ExpendFuel (float quantity) |
| expendFuel - reduce fuel by burning it More... | |
| void | ExpendFuel () |
| void | ExpendEnergy (const bool player_ship) |
| void | ExpendEnergy (float usage) |
| void | ExpendEnergyToRechargeShields () |
| float | getWarpEnergy () const |
| void | increaseWarpEnergy (bool insys, float time) |
| float | maxEnergyData () const |
| void | MaintainECM () |
| void | MaintainShields () |
| void | rechargeEnergy () |
| void | RechargeWarpCapacitors (const bool player_ship) |
| bool | refillWarpEnergy () |
| void | setAfterburnerEnergy (float aft) |
| void | setEnergyRecharge (float enrech) |
| void | setFuel (float f) |
| float | totalShieldEnergyCapacitance () |
| float | warpCapData () const |
| float | warpEnergyData () const |
| float | WarpEnergyMultiplier (const bool player_ship) |
| class csOPCODECollider * | getCollideTree (const Vector &scale=Vector(1, 1, 1), std::vector< struct mesh_polygon > *=NULL) |
| Order * | getAIState () const |
| void | PrimeOrders () |
| void | PrimeOrders (Order *newAI) |
| void | PrimeOrdersLaunched () |
| void | SetAI (Order *newAI) |
| void | EnqueueAI (Order *newAI) |
| void | EnqueueAIFirst (Order *newAI) |
| void | LoadAIScript (const std::string &aiscript) |
| bool | LoadLastPythonAIScript () |
| bool | EnqueueLastPythonAIScript () |
| double | getMinDis (const QVector &pnt) const |
| void | SetTurretAI () |
| void | DisableTurretAI () |
| std::string | getFullAIDescription () |
| void | eraseOrderType (unsigned int type) |
| void | ExecuteAI () |
| bool | isEnemy (const Unit *other) const |
| bool | isFriend (const Unit *other) const |
| bool | isNeutral (const Unit *other) const |
| float | getRelation (const Unit *other) const |
| float | getMass () |
| float | getMass () const |
| void | setMass (float mass) |
| void | AddVelocity (float difficulty) |
| void | SetPosition (const QVector &pos) |
| void | SetOrientation (QVector q, QVector r) |
| void | SetOrientation (Quaternion Q) |
| void | SetOrientation (QVector p, QVector q, QVector r) |
| void | GetOrientation (Vector &p, Vector &q, Vector &r) const |
| Vector | GetNetAcceleration () const |
| Vector | GetNetAngularAcceleration () const |
| Vector | GetAcceleration () const |
| Vector | GetAngularAcceleration () const |
| float | GetMaxAccelerationInDirectionOf (const Vector &ref, bool afterburn) const |
| Vector | UpCoordinateLevel (const Vector &v) const |
| Vector | DownCoordinateLevel (const Vector &v) const |
| Vector | ToLocalCoordinates (const Vector &v) const |
| Vector | ToWorldCoordinates (const Vector &v) const |
| void | UpdatePhysics (const Transformation &trans, const Matrix &transmat, const Vector &CumulativeVelocity, bool ResolveLast, UnitCollection *uc, Unit *superunit) |
| const Vector & | GetAngularVelocity () const |
| const Vector & | GetVelocity () const |
| void | SetVelocity (const Vector &) |
| void | SetAngularVelocity (const Vector &) |
| float | GetMoment () const |
| float | GetMass () const |
| void | SetResolveForces (bool) |
| double | GetMaxWarpFieldStrength (float rampmult=1.f) const |
| void | DecreaseWarpEnergy (bool insystem, float time=1.0f) |
| void | IncreaseWarpEnergy (bool insystem, float time=1.0f) |
| void | Rotate (const Vector &axis) |
| void | ActivateJumpDrive (int destination=0) |
| void | AddDestination (const std::string &) |
| bool | AutoPilotTo (Unit *un, bool automaticenergyrealloc) |
| bool | AutoPilotToErrorMessage (const Unit *un, bool automaticenergyrealloc, std::string &failuremessage, int recursive_level=2) |
| float | CalculateNearestWarpUnit (float minmultiplier, Unit **nearest_unit, bool count_negative_warp_units) const |
| float | CourseDeviation (const Vector &OriginalCourse, const Vector &FinalCourse) const |
| void | DeactivateJumpDrive () |
| const std::vector< std::string > & | GetDestinations () const |
| const Energetic::UnitJump & | GetJumpStatus () const |
| StarSystem * | getStarSystem () |
| const StarSystem * | getStarSystem () const |
| Vector | GetWarpRefVelocity () const |
| Vector | GetWarpVelocity () const |
| bool | InCorrectStarSystem (StarSystem *) |
| virtual bool | TransferUnitToSystem (StarSystem *NewSystem) |
| void | SortCargo () |
| bool | CanAddCargo (const Cargo &carg) const |
| void | AddCargo (const Cargo &carg, bool sort=true) |
| int | RemoveCargo (unsigned int i, int quantity, bool eraseZero=true) |
| float | PriceCargo (const std::string &s) |
| Cargo & | GetCargo (unsigned int i) |
| const Cargo & | GetCargo (unsigned int i) const |
| Cargo * | GetCargo (const std::string &s, unsigned int &i) |
| const Cargo * | GetCargo (const std::string &s, unsigned int &i) const |
| void | GetSortedCargoCat (const std::string &category, size_t &catbegin, size_t &catend) |
| unsigned int | numCargo () const |
| std::string | GetManifest (unsigned int i, Unit *scanningUnit, const Vector &original_velocity) const |
| bool | SellCargo (unsigned int i, int quantity, float &creds, Cargo &carg, Unit *buyer) |
| bool | SellCargo (const std::string &s, int quantity, float &creds, Cargo &carg, Unit *buyer) |
| bool | BuyCargo (const Cargo &carg, float &creds) |
| bool | BuyCargo (unsigned int i, unsigned int quantity, Unit *buyer, float &creds) |
| bool | BuyCargo (const std::string &cargo, unsigned int quantity, Unit *buyer, float &creds) |
| void | EjectCargo (unsigned int index) |
| float | getEmptyCargoVolume (void) const |
| float | getCargoVolume (void) const |
| float | getEmptyUpgradeVolume (void) const |
| float | getUpgradeVolume (void) const |
| float | getHiddenCargoVolume (void) const |
Static Public Member Functions | |
| static void | ProcessDeleteQueue () |
| static void | beginElement (void *userData, const XML_Char *name, const XML_Char **atts) |
| static void | endElement (void *userData, const XML_Char *name) |
| static void | UpdateFrames () |
| static float | getFuelUsage (bool afterburner) |
| static float | VSDPercent () |
| static std::string | cargoSerializer (const struct XMLType &input, void *mythis) |
| static Unit * | makeMasterPartList () |
Static Public Attributes | |
| static unsigned int | unitCount = 0 |
| static std::map< string, Unit * > | Units |
Protected Member Functions | |
| virtual float | ExplosionRadius () |
| void | ActivateGuns (const WeaponInfo *, bool Missile) |
| cycles through the loop twice turning on all matching to ms weapons of size or after size More... | |
| void | playExplosionDamageSound () |
| void | playEngineSound () |
| void | killSounds () |
Static Protected Member Functions | |
| static std::string | massSerializer (const struct XMLType &input, void *mythis) |
| static std::string | mountSerializer (const struct XMLType &input, void *mythis) |
| static std::string | subunitSerializer (const struct XMLType &input, void *mythis) |
Protected Attributes | |
| StringPool::Reference | csvRow |
| std::string | fullname |
| vector< vector< Mesh * > * > | vecAnimations |
| vector< string > | vecAnimationNames |
| bool | animatedMesh |
| unsigned int | activeAnimation |
| double | timeperframe |
| bool | done |
| unsigned int | activeMesh |
| unsigned int | nextactiveMesh |
| bool | infiniteLoop |
| unsigned int | loopCount |
| string | uniqueUnitName |
| float | fuel |
| float | afterburnenergy |
| int | afterburntype |
| float | Momentofinertia |
| Vector | SavedAccel |
| Vector | SavedAngAccel |
| float | cutsqr {0.0F} |
| float | outcutsqr {0.0F} |
| float | air_res_coef {0.0F} |
| float | lateral_air_res_coef {0.0F} |
Private Member Functions | |
| void | RechargeEnergy () |
Private Attributes | |
| unsigned char | attack_preference = ROLES::getRole("INERT") |
| unsigned char | unit_role = ROLES::getRole("INERT") |
| unsigned char | tractorability_flags = tractorImmune |
Friends | |
| class | Mount |
| class | PlanetaryOrbit |
| class | ContinuousTerrain |
| class | VDU |
| class | UpgradingInfo |
unit.h
Unit contains any physical object that may collide with something And may be physically affected by forces.
Copyright (c) 2001-2002 Daniel Horn Copyright (c) 2002-2019 pyramid3d and other Vega Strike Contributors Copyright (c) 2019-2021 Stephen G. Tuggy, and other Vega Strike Contributors Copyright (C) 2022 Stephen G. Tuggy
https://github.com/vegastrike/Vega-Strike-Engine-Source
This file is part of Vega Strike.
Vega Strike is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
Vega Strike is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Vega Strike. If not, see https://www.gnu.org/licenses/.
Units are assumed to have various damage and explode when they are dead. Units may have any number of weapons which, themselves may be units the aistate indicates how the unit will behave in the upcoming phys frame
| Enumerator | |
|---|---|
| UNIT_ONLY | |
| UNIT_BOLT | |
| NUM_COLLIDE_MAPS | |
Definition at line 834 of file unit_generic.h.
| enum Unit::Damages |
| Enumerator | |
|---|---|
| NO_DAMAGE | |
| SHIELD_DAMAGED | |
| COMPUTER_DAMAGED | |
| MOUNT_DAMAGED | |
| CARGOFUEL_DAMAGED | |
| JUMP_DAMAGED | |
| CLOAK_DAMAGED | |
| LIMITS_DAMAGED | |
| ARMOR_DAMAGED | |
Definition at line 226 of file unit_generic.h.
|
inherited |
| enum Unit::INVIS |
| Enumerator | |
|---|---|
| DEFAULTVIS | |
| INVISGLOW | |
| INVISUNIT | |
| INVISCAMERA | |
Definition at line 598 of file unit_generic.h.
| enum Unit::Names |
| Enumerator | |
|---|---|
| UNKNOWN | |
| UNIT | |
| SCALE | |
| MESHFILE | |
| XFILE | |
Definition at line 227 of file objconv/MeshParse/mesh_xml.cpp.
| Enumerator | |
|---|---|
| scheduleDefault | |
| scheduleAField | |
| scheduleRoid | |
Definition at line 562 of file unit_generic.h.
| enum Unit::tractorHow |
| Enumerator | |
|---|---|
| tractorImmune | |
| tractorPush | |
| tractorIn | |
| tractorBoth | |
Definition at line 972 of file unit_generic.h.
|
delete |
| Unit::Unit | ( | ) |
Definition at line 282 of file unit_generic.cpp.


|
override |
Definition at line 326 of file unit_generic.cpp.
| Unit::Unit | ( | int | dummy | ) |
Default constructor.
This is just to figure out where default constructors are used. The useless argument will be removed again later.
Definition at line 274 of file unit_generic.cpp.

Constructor that creates aa mesh with meshes as submeshes (number of them) as either as subunit with faction faction.
Definition at line 291 of file unit_generic.cpp.

| Unit::Unit | ( | const char * | filename, |
| bool | SubUnit, | ||
| int | faction, | ||
| std::string | customizedUnit = std::string( ""), |
||
| Flightgroup * | flightgroup = NULL, |
||
| int | fg_subnumber = 0 |
||
| ) |
Constructor that creates a mesh from an XML file If it is a customizedUnit, it will check in that directory in the home dir for the unit.
Definition at line 311 of file unit_generic.cpp.

| void Unit::Accelerate | ( | const Vector & | Vforce | ) |
|
protectedinherited |
|
inherited |
| void Unit::ActTurn | ( | ) |
Definition at line 4894 of file unit_generic.cpp.


|
inherited |
Definition at line 478 of file carrier.cpp.


|
inherited |
|
inherited |
|
virtual |
Definition at line 5418 of file unit_generic.cpp.


|
inherited |
|
inherited |
|
inherited |
Definition at line 177 of file movable.cpp.


|
inherited |
Definition at line 84 of file audible.cpp.


|
inherited |
|
inherited |
|
inherited |
Definition at line 95 of file damageable.cpp.


| void Unit::ApplyForce | ( | const Vector & | Vforce | ) |
| float Unit::ApplyLocalDamage | ( | const Vector & | pnt, |
| const Vector & | normal, | ||
| Damage | damage, | ||
| Unit * | affectedSubUnit, | ||
| const GFXColor & | |||
| ) |

| void Unit::ApplyLocalForce | ( | const Vector & | Vforce | ) |
| void Unit::ApplyLocalTorque | ( | const Vector & | torque | ) |
| void Unit::ApplyNetDamage | ( | Vector & | pnt, |
| Vector & | normal, | ||
| float | amt, | ||
| float | ppercentage, | ||
| float | spercentage, | ||
| GFXColor & | color | ||
| ) |

|
virtual |
Definition at line 4753 of file unit_generic.cpp.


|
inherited |
Definition at line 524 of file damageable.cpp.


Definition at line 115 of file jump_capable.cpp.


|
inherited |
Definition at line 120 of file jump_capable.cpp.


|
static |
| void Unit::beginElement | ( | const std::string & | name, |
| const XMLSupport::AttributeList & | attributes | ||
| ) |
|
inherited |
Definition at line 490 of file damageable.cpp.


| void Unit::calculate_extent | ( | bool | update_collide_queue | ) |
Definition at line 570 of file unit_generic.cpp.


|
inherited |
Definition at line 385 of file jump_capable.cpp.


Definition at line 500 of file carrier.cpp.


Definition at line 2441 of file unit_generic.cpp.


| bool Unit::canDowngrade | ( | const Unit * | downgradeor, |
| int | mountoffset, | ||
| int | subunitoffset, | ||
| double & | percentage, | ||
| const Unit * | downgradelimit, | ||
| bool | gen_downgrade_list = true |
||
| ) |
Definition at line 3140 of file unit_generic.cpp.


| bool Unit::canUpgrade | ( | const Unit * | upgrador, |
| int | mountoffset, | ||
| int | subunitoffset, | ||
| int | additive, | ||
| bool | force, | ||
| double & | percentage, | ||
| const Unit * | templ = NULL, |
||
| bool | force_change_on_nothing = false, |
||
| bool | gen_downgrade_list = true |
||
| ) |
Definition at line 3094 of file unit_generic.cpp.


|
staticinherited |
|
inherited |
|
inherited |
Definition at line 1258 of file unit_generic.cpp.


Definition at line 1157 of file unit_generic.cpp.


Definition at line 1191 of file unit_generic.cpp.


|
inherited |
Definition at line 601 of file drawable.cpp.


| void Unit::ClearMounts | ( | ) |
Definition at line 1206 of file unit_generic.cpp.


|
virtual |
Definition at line 1974 of file unit_generic.cpp.


|
inline |
Definition at line 609 of file unit_generic.h.


Definition at line 299 of file unit_collide.cpp.


| void Unit::CollideAll | ( | ) |
Definition at line 128 of file unit_collide.cpp.


| bool Unit::CombatMode | ( | ) |
| float Unit::computeLockingPercent | ( | ) |
Definition at line 77 of file cockpit_generic.cpp.


Definition at line 693 of file unit_generic.cpp.


| float Unit::cosAngleTo | ( | Unit * | target, |
| float & | distance, | ||
| float | speed = 0.001, |
||
| float | range = 0.001, |
||
| bool | turnmargin = true |
||
| ) | const |
Definition at line 658 of file unit_generic.cpp.


|
inherited |
Definition at line 480 of file jump_capable.cpp.


|
inherited |
Definition at line 381 of file damageable.cpp.


|
inherited |
Definition at line 354 of file damageable.cpp.


Definition at line 1434 of file unit_generic.cpp.


|
inherited |
|
inherited |
Definition at line 57 of file damageable_object.cpp.


Definition at line 61 of file damageable.cpp.


Definition at line 77 of file damageable.cpp.


Definition at line 58 of file energetic.cpp.



|
inherited |
Definition at line 71 of file energetic.cpp.


| void Unit::Deselect | ( | ) |
|
inherited |
Definition at line 456 of file damageable.cpp.


|
inherited |
|
inherited |
Definition at line 288 of file intelligent.cpp.


Definition at line 2417 of file unit_generic.cpp.


|
inline |
Definition at line 914 of file unit_generic.h.


| const std::vector< struct DockingPorts > & Unit::DockingPortLocations | ( | ) | const |
Definition at line 413 of file movable.cpp.


| bool Unit::Downgrade | ( | const Unit * | downgradeor, |
| int | mountoffset, | ||
| int | subunitoffset, | ||
| double & | percentage, | ||
| const Unit * | downgradelimit, | ||
| bool | gen_downgrade_list = true |
||
| ) |
Definition at line 3160 of file unit_generic.cpp.


|
virtualinherited |
this is the final, smoothly calculated cam
Reimplemented in AtmosphereHalo, and Planet.
Definition at line 168 of file drawable.cpp.


|
inlineoverridevirtual |
Implements Drawable.
Definition at line 445 of file unit_generic.h.

|
inherited |
Definition at line 83 of file drawable.cpp.


Definition at line 708 of file drawable.cpp.


|
virtualinherited |
Draws this unit with the transformation and matrix (should be equiv) separately.
Definition at line 385 of file drawable.cpp.

|
inherited |
Definition at line 752 of file drawable.cpp.


|
inherited |
Definition at line 162 of file carrier.cpp.


|
static |
| void Unit::endElement | ( | const std::string & | name | ) |
|
inherited |
Definition at line 91 of file energetic.cpp.


|
inherited |
|
inherited |
Definition at line 160 of file intelligent.cpp.


|
inherited |
Definition at line 171 of file intelligent.cpp.


|
inherited |
Definition at line 99 of file intelligent.cpp.


|
inherited |
|
inherited |
Definition at line 182 of file intelligent.cpp.


|
inherited |
Definition at line 249 of file energetic.cpp.


|
inherited |
Definition at line 262 of file energetic.cpp.
|
inherited |
Definition at line 320 of file energetic.cpp.


expendFuel - reduce fuel by burning it
| quantity | - requested quantity to use |
Definition at line 151 of file energetic.cpp.

|
inherited |
Definition at line 269 of file energetic.cpp.


Definition at line 137 of file energetic.cpp.


Definition at line 2014 of file unit_generic.cpp.


| float Unit::ExplodingProgress | ( | ) | const |
Definition at line 2155 of file unit_generic.cpp.


|
protectedvirtual |
Reimplemented in Missile.
Definition at line 1772 of file unit_generic.cpp.


| vector< CargoColor > & Unit::FilterDowngradeList | ( | std::vector< class CargoColor > & | mylist, |
| bool | downgrade = true |
||
| ) |
Definition at line 4254 of file unit_generic.cpp.


| vector< CargoColor > & Unit::FilterUpgradeList | ( | std::vector< class CargoColor > & | mylist | ) |
Definition at line 4348 of file unit_generic.cpp.


Fire engine takes a unit vector for direction and how fast the fuel speed and mass coming out are.
Definition at line 1097 of file unit_generic.cpp.


|
inherited |
Definition at line 582 of file damageable.cpp.


Definition at line 2350 of file unit_generic.cpp.


|
inherited |
Definition at line 577 of file drawable.cpp.
| void Unit::FreeDockingPort | ( | unsigned int | whichport | ) |
|
inherited |
Definition at line 479 of file damageable.cpp.


|
inherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 47 of file intelligent.h.


|
inlineinherited |
|
inlineinherited |
|
inherited |
Definition at line 545 of file drawable.cpp.
|
inherited |
|
inlineinherited |
| const std::string & Unit::getAttackPreference | ( | ) | const |
Definition at line 4534 of file unit_generic.cpp.


|
inline |
|
inline |
Definition at line 372 of file unit_generic.h.
Definition at line 618 of file carrier.cpp.
|
inherited |
Definition at line 534 of file carrier.cpp.


| const std::string & Unit::getCockpit | ( | ) | const |
|
inherited |
Definition at line 304 of file intelligent.cpp.


| const std::string & Unit::getCombatRole | ( | ) | const |
Definition at line 4545 of file unit_generic.cpp.


|
inline |
Definition at line 477 of file unit_generic.h.
|
inherited |
|
inherited |
|
inherited |
| const string Unit::getFgID | ( | ) |
|
inline |
Definition at line 953 of file unit_generic.h.


|
inline |
Definition at line 992 of file unit_generic.h.
|
inline |
Definition at line 112 of file energetic.cpp.


|
inherited |
Definition at line 210 of file intelligent.cpp.


|
inline |
|
inherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 95 of file damageable.h.
|
inlinevirtualinherited |
Reimplemented in Planet.
Definition at line 111 of file damageable.h.


| UnitImages< void > & Unit::GetImageInformation | ( | ) |
|
inherited |
|
inherited |
FIXME somehow mangle string
Definition at line 710 of file carrier.cpp.


|
inlineinherited |
|
inlineinherited |
|
inherited |
Definition at line 111 of file movable.cpp.


Definition at line 436 of file movable.cpp.


|
inherited |
Definition at line 226 of file intelligent.cpp.


|
inlineinherited |
|
inline |
Definition at line 405 of file unit_generic.h.


|
inherited |
Definition at line 95 of file movable.cpp.


|
inherited |
Definition at line 103 of file movable.cpp.


|
inherited |
Definition at line 87 of file movable.cpp.


Definition at line 220 of file intelligent.cpp.


|
inlineinherited |
|
inlinevirtualinherited |
Reimplemented in Planet.
Definition at line 115 of file damageable.h.


|
inlineinherited |
|
inherited |
Definition at line 623 of file carrier.cpp.


|
inherited |
Definition at line 506 of file jump_capable.cpp.


|
inherited |
| un_iter Unit::getSubUnits | ( | ) |
Definition at line 762 of file unit_generic.cpp.


| enum Unit::tractorHow Unit::getTractorability | ( | ) | const |
Definition at line 4696 of file unit_generic.cpp.


|
inline |
| const std::string & Unit::getUnitRole | ( | ) | const |
Definition at line 4530 of file unit_generic.cpp.


|
inline |
|
inline |
|
inherited |
Definition at line 602 of file carrier.cpp.


|
inlineinherited |
Definition at line 1088 of file unit_generic.cpp.


|
inherited |
|
inherited |
Definition at line 536 of file jump_capable.cpp.


|
inherited |
Definition at line 556 of file jump_capable.cpp.


| bool Unit::hasPendingClearanceRequests | ( | ) | const |
|
inline |
Contains information about a particular Mount on a unit.
And the weapons it has, where it is, where it's aimed, The ammo and the weapon type. As well as the possible weapons it may fit Warning: type has a string inside... cannot be memcpy'd
Definition at line 271 of file unit_generic.h.


| void Unit::ImportPartList | ( | const std::string & | category, |
| float | price, | ||
| float | pricedev, | ||
| float | quantity, | ||
| float | quantdev | ||
| ) |
Definition at line 4397 of file unit_generic.cpp.


|
inherited |
Definition at line 166 of file energetic.cpp.



| void Unit::Init | ( | ) |
Definition at line 387 of file unit_generic.cpp.


| void Unit::Init | ( | const char * | filename, |
| bool | SubUnit, | ||
| int | faction, | ||
| std::string | customizedUnit = std::string( ""), |
||
| Flightgroup * | flightgroup = NULL, |
||
| int | fg_subnumber = 0 |
||
| ) |
Definition at line 777 of file unit_generic.h.


Definition at line 172 of file unit_collide.cpp.


| bool Unit::InsideCollideTree | ( | Unit * | smaller, |
| QVector & | bigpos, | ||
| Vector & | bigNormal, | ||
| QVector & | smallpos, | ||
| Vector & | smallNormal, | ||
| bool | bigasteroid = false, |
||
| bool | smallasteroid = false |
||
| ) |
Definition at line 185 of file unit_collide.cpp.


|
inherited |
| bool Unit::IsBase | ( | ) | const |
|
inherited |
Definition at line 82 of file intelligent.h.


|
inline |
Definition at line 626 of file unit_generic.h.


|
inline |
Definition at line 1018 of file unit_generic.h.


|
inline |
Definition at line 1014 of file unit_generic.h.


|
overridevirtual |
Reimplemented from Movable.
Definition at line 5381 of file unit_generic.cpp.

|
inline |
Definition at line 1010 of file unit_generic.h.


|
inline |
Definition at line 280 of file unit_generic.h.


| bool Unit::isTractorable | ( | enum tractorHow | how = tractorBoth | ) | const |
Definition at line 4684 of file unit_generic.cpp.


|
inlinevirtual |
Reimplemented in Planet, Missile, Building, Enhancement, Asteroid, and Nebula.
Definition at line 997 of file unit_generic.h.

Definition at line 1027 of file unit_generic.cpp.


|
inline |
|
inline |
|
inline |
Definition at line 622 of file unit_generic.h.
|
protectedinherited |
Definition at line 127 of file audible.cpp.


| void Unit::LateralThrust | ( | float | amt | ) |
Definition at line 1354 of file unit_generic.cpp.


|
inherited |
Definition at line 967 of file drawable.cpp.


|
inherited |
Definition at line 58 of file intelligent.cpp.


|
inherited |
Definition at line 88 of file intelligent.cpp.


Definition at line 671 of file unit_csv.cpp.


| void Unit::LoadXML | ( | const char * | filename, |
| const char * | unitModifications = "", |
||
| std::string * | xmlbuffer = NULL |
||
| ) |
| void Unit::LoadXML | ( | VSFileSystem::VSFile & | f, |
| const char * | unitModifications = "", |
||
| std::string * | xmlbuffer = NULL |
||
| ) |
Definition at line 604 of file unit_generic.h.


|
inline |
|
inherited |
| void Unit::LongitudinalThrust | ( | float | amt | ) |
Definition at line 1374 of file unit_generic.cpp.


|
inherited |
Definition at line 501 of file damageable.cpp.


|
inherited |
Definition at line 283 of file energetic.cpp.


|
inherited |
Definition at line 294 of file energetic.cpp.


|
staticinherited |
Definition at line 545 of file carrier.cpp.


|
staticprotected |
|
inherited |
Definition at line 179 of file energetic.cpp.


|
inherited |
Definition at line 577 of file damageable.cpp.


|
staticprotected |
|
inherited |
|
inherited |
|
inlineinherited |
Definition at line 142 of file drawable.h.


| void Unit::PerformDockingOperations | ( | ) |
CHOOSE NEW MISSION
force him in a box...err where he is
Definition at line 2314 of file unit_generic.cpp.


| void Unit::PitchTorque | ( | float | amt | ) |
Definition at line 1393 of file unit_generic.cpp.


|
inherited |
Definition at line 104 of file audible.cpp.


|
protectedinherited |
Definition at line 118 of file audible.cpp.


|
protectedinherited |
Definition at line 123 of file audible.cpp.


|
inherited |
Definition at line 111 of file audible.cpp.


|
inherited |
Definition at line 97 of file audible.cpp.


|
inherited |
Definition at line 93 of file audible.cpp.


|
inline |
Definition at line 642 of file unit_generic.h.
|
inherited |
Definition at line 581 of file carrier.cpp.


|
inherited |
Definition at line 123 of file intelligent.cpp.


|
inherited |
|
inherited |
Definition at line 134 of file intelligent.cpp.


|
static |
might modify unitdeletequeue
Definition at line 1777 of file unit_generic.cpp.

| bool Unit::queryFrustum | ( | double | frustum[6][4] | ) | const |
Updates the collide Queue with any possible change in sectors Queries if this unit is within a given frustum.
Definition at line 5387 of file unit_generic.cpp.


Definition at line 479 of file unit_collide.cpp.


Definition at line 2174 of file unit_generic.cpp.


Queries the bounding sphere with a duo of mouse coordinates that project to the center of a ship and compare with a sphere...pretty fast queries the sphere for weapons (world space point) Only in Unit class.
Definition at line 38 of file unit_click.h.

| float Unit::querySphereNoRecurse | ( | const QVector & | start, |
| const QVector & | end, | ||
| float | my_unit_radius = 0 |
||
| ) | const |
Definition at line 556 of file unit_collide.cpp.


| Unit * Unit::rayCollide | ( | const QVector & | st, |
| const QVector & | end, | ||
| Vector & | normal, | ||
| float & | distance | ||
| ) |
Definition at line 415 of file unit_collide.cpp.


|
overridevirtual |
Implements Movable.
Definition at line 998 of file unit_generic.cpp.

|
inherited |
Definition at line 183 of file energetic.cpp.


|
private |
|
inherited |
Definition at line 348 of file energetic.cpp.


| bool Unit::ReduceToTemplate | ( | ) |
Definition at line 3996 of file unit_generic.cpp.


|
inline |
| void Unit::Ref | ( | ) |
|
inherited |
Definition at line 189 of file energetic.cpp.


Definition at line 537 of file damageable.cpp.


Definition at line 455 of file carrier.cpp.


| void Unit::RemoveFromSystem | ( | ) |
Definition at line 58 of file unit_collide.cpp.


| void Unit::Repair | ( | ) |
Definition at line 4593 of file unit_generic.cpp.


| int Unit::RepairCost | ( | ) |
Definition at line 4025 of file unit_generic.cpp.


| int Unit::RepairUpgrade | ( | ) |
Definition at line 4065 of file unit_generic.cpp.


Definition at line 4176 of file unit_generic.cpp.


returns -1 if unit cannot dock, otherwise returns which dock it can dock at
Definition at line 2270 of file unit_generic.cpp.

| void Unit::RequestPhysics | ( | ) |
Definition at line 4723 of file unit_generic.cpp.


|
inline |
Definition at line 795 of file unit_generic.h.


|
overridevirtual |
Resolves forces of given unit on a physics frame.
Reimplemented from Movable.
Definition at line 5018 of file unit_generic.cpp.


| void Unit::RestoreGodliness | ( | ) |
Definition at line 184 of file unit_generic.cpp.


| void Unit::ReTargetFg | ( | int | which_target = 0 | ) |
Definition at line 802 of file unit_generic.cpp.


| void Unit::RollTorque | ( | float | amt | ) |
Definition at line 1402 of file unit_generic.cpp.


|
inherited |
Definition at line 256 of file movable.cpp.


|
inherited |
Definition at line 512 of file damageable.cpp.


|
inline |
Definition at line 637 of file unit_generic.h.
| void Unit::Select | ( | ) |
|
inherited |
|
inherited |
Definition at line 735 of file carrier.cpp.


|
inherited |
Definition at line 756 of file carrier.cpp.
|
inherited |
Definition at line 207 of file energetic.cpp.
|
inherited |
Definition at line 149 of file intelligent.cpp.


| void Unit::SetAllVisible | ( | bool | isvis | ) |
|
inherited |
|
inherited |
| void Unit::setAttackPreference | ( | const std::string & | s | ) |
Definition at line 4526 of file unit_generic.cpp.


|
inherited |
| void Unit::SetCollisionParent | ( | Unit * | name | ) |
Definition at line 2160 of file unit_generic.cpp.
| void Unit::setCombatRole | ( | const std::string & | s | ) |
Definition at line 4539 of file unit_generic.cpp.


|
inline |
Sets the cumulative transformation matrix's position...for setting up to be out in the middle of nowhere.
Definition at line 656 of file unit_generic.h.

|
inherited |
Definition at line 211 of file energetic.cpp.
| void Unit::setFaceCamera | ( | ) |
| void Unit::SetFaction | ( | int | faction | ) |
Definition at line 610 of file unit_generic.cpp.


| void Unit::SetFg | ( | Flightgroup * | fg, |
| int | fg_snumber | ||
| ) |
|
inherited |
Definition at line 215 of file energetic.cpp.
|
inline |
| void Unit::SetGlowVisible | ( | bool | isvis | ) |
|
inlineinherited |
| void Unit::SetNebula | ( | Nebula * | neb | ) |
Definition at line 120 of file unit_generic.cpp.


Definition at line 381 of file movable.cpp.


|
inherited |
Definition at line 397 of file movable.cpp.
| void Unit::SetOwner | ( | Unit * | target | ) |
|
inline |
Definition at line 660 of file unit_generic.h.


|
inherited |
| void Unit::SetRecursiveOwner | ( | Unit * | target | ) |
Definition at line 1996 of file unit_generic.cpp.


|
inherited |
| void Unit::setTargetFg | ( | std::string | primary, |
| std::string | secondary = std::string(), |
||
| std::string | tertiary = std::string() |
||
| ) |
Definition at line 794 of file unit_generic.cpp.


| void Unit::setTractorability | ( | enum tractorHow | how | ) |
Definition at line 4692 of file unit_generic.cpp.
|
inherited |
Definition at line 259 of file intelligent.cpp.


| void Unit::setUnitRole | ( | const std::string & | s | ) |
Definition at line 4522 of file unit_generic.cpp.


|
inherited |
| void Unit::SetVisible | ( | bool | isvis | ) |
Definition at line 46 of file damageable.cpp.


|
inherited |
Drawable::Sparkle caused damaged units to emit sparks.
Definition at line 642 of file drawable.cpp.


|
inlinevirtual |
Definition at line 426 of file unit_generic.h.


Definition at line 533 of file drawable.cpp.


| vector< Mesh * > Unit::StealMeshes | ( | ) |
Definition at line 543 of file unit_generic.cpp.


|
inherited |
|
staticprotected |
| void Unit::SwitchCombatFlightMode | ( | ) |
| Unit * Unit::Target | ( | ) |
Definition at line 164 of file unit_generic.cpp.
| const Unit * Unit::Target | ( | ) | const |
Definition at line 168 of file unit_generic.cpp.
| void Unit::Target | ( | Unit * | targ | ) |
| void Unit::TargetTurret | ( | Unit * | targ | ) |
Definition at line 1887 of file unit_generic.cpp.


| Unit * Unit::Threat | ( | ) |
Definition at line 4957 of file unit_generic.cpp.


|
inherited |
Definition at line 581 of file drawable.cpp.
|
inherited |
Definition at line 589 of file drawable.cpp.
|
inherited |
Definition at line 234 of file energetic.cpp.


Definition at line 431 of file movable.cpp.


|
virtualinherited |
Definition at line 594 of file jump_capable.cpp.


|
overridevirtual |
eradicating from system, leaving no trace
Reimplemented from JumpCapable.
Definition at line 5464 of file unit_generic.cpp.


| void Unit::TurretFAW | ( | ) |
Definition at line 4368 of file unit_generic.cpp.


Definition at line 2508 of file unit_generic.cpp.


|
inherited |
|
inline |
| void Unit::UnRef | ( | ) |
| bool Unit::UpAndDownGrade | ( | const Unit * | up, |
| const Unit * | templ, | ||
| int | mountoffset, | ||
| int | subunitoffset, | ||
| bool | touchme, | ||
| bool | downgrade, | ||
| int | additive, | ||
| bool | forcetransaction, | ||
| double & | percentage, | ||
| const Unit * | downgrade_min, | ||
| bool | force_change_on_nothing, | ||
| bool | gen_downgrade_list | ||
| ) |
Definition at line 3398 of file unit_generic.cpp.


Definition at line 403 of file movable.cpp.


| void Unit::UpdateCloak | ( | ) |
Definition at line 5331 of file unit_generic.cpp.


| void Unit::UpdateCollideQueue | ( | StarSystem * | ss, |
| CollideMap::iterator | hint[NUM_COLLIDE_MAPS] | ||
| ) |
Definition at line 113 of file unit_collide.cpp.


|
staticinherited |
Definition at line 515 of file drawable.cpp.


|
inherited |
Sets the camera to be within this unit.
Definition at line 1025 of file drawable.cpp.


|
inherited |
Definition at line 136 of file movable.cpp.


|
overridevirtual |
Updates physics given unit space transformations and if this is the last physics frame in the current gfx frame.
Reimplemented from Movable.
Definition at line 4905 of file unit_generic.cpp.


|
overridevirtual |
Implements Movable.
Definition at line 5026 of file unit_generic.cpp.

|
virtual |
Definition at line 912 of file unit_generic.cpp.


|
virtual |
| bool Unit::Upgrade | ( | const Unit * | upgrador, |
| int | mountoffset, | ||
| int | subunitoffset, | ||
| int | additive, | ||
| bool | force, | ||
| double & | percentage, | ||
| const Unit * | templ = NULL, |
||
| bool | force_change_on_nothing = false, |
||
| bool | gen_downgrade_list = true |
||
| ) |
Definition at line 3117 of file unit_generic.cpp.


|
virtual |
Definition at line 5430 of file unit_generic.cpp.


| bool Unit::UpgradeMounts | ( | const Unit * | up, |
| int | subunitoffset, | ||
| bool | touchme, | ||
| bool | downgrade, | ||
| int & | numave, | ||
| const Unit * | templ, | ||
| double & | percentage | ||
| ) |
go through all guns
search for right mount to remove starting from j. this is the right name
calculate scrap value (if damaged)
deactivate weapon
deactivate weapon
go through all guns
Definition at line 2760 of file unit_generic.cpp.


| bool Unit::UpgradeSubUnits | ( | const Unit * | up, |
| int | subunitoffset, | ||
| bool | touchme, | ||
| bool | downgrade, | ||
| int & | numave, | ||
| double & | percentage | ||
| ) |
Definition at line 50 of file unit_customize.h.


| bool Unit::UpgradeSubUnitsWithFactory | ( | const Unit * | up, |
| int | subunitoffset, | ||
| bool | touchme, | ||
| bool | downgrade, | ||
| int & | numave, | ||
| double & | percentage, | ||
| Unit *(*)(std::string s, int faction) | createupgradesubunit | ||
| ) |
set the turrets to the offset
Definition at line 3001 of file unit_generic.cpp.


| Unit * Unit::VelocityReference | ( | ) |
| const Unit * Unit::VelocityReference | ( | ) | const |
Definition at line 176 of file unit_generic.cpp.
| void Unit::VelocityReference | ( | Unit * | targ | ) |
Definition at line 1965 of file unit_generic.cpp.
| void Unit::VerticalThrust | ( | float | amt | ) |
Definition at line 1364 of file unit_generic.cpp.


|
inline |
| un_kiter Unit::viewSubUnits | ( | ) | const |
Definition at line 766 of file unit_generic.cpp.


|
staticinherited |
Definition at line 380 of file energetic.cpp.


|
inherited |
|
inherited |
Definition at line 368 of file energetic.cpp.


Holds temporary values for inter-function XML communication Saves deprecated restr info.
Definition at line 987 of file drawable.cpp.


|
inherited |
Energetic::WCWarpIsFuelHack - in Wing Commander, warp and fuel are the same variable.
Therefore, we need to transfer from one to the other to maintain equality
| transfer_warp_to_fuel | - true means fuel = warpenergy |
Definition at line 125 of file energetic.cpp.


| void Unit::WriteUnit | ( | const char * | modificationname = "" | ) |
Definition at line 1146 of file unit_csv.cpp.


| string Unit::WriteUnitString | ( | ) |
Definition at line 1206 of file unit_csv.cpp.


| void Unit::YawTorque | ( | float | amt | ) |
Definition at line 1384 of file unit_generic.cpp.


|
friend |
Definition at line 395 of file unit_generic.h.
|
friend |
Definition at line 346 of file unit_generic.h.
|
friend |
Definition at line 394 of file unit_generic.h.
|
friend |
Definition at line 399 of file unit_generic.h.
|
friend |
Definition at line 397 of file unit_generic.h.
|
protectedinherited |
Definition at line 58 of file drawable.h.
|
protectedinherited |
Definition at line 61 of file drawable.h.
|
inherited |
Definition at line 38 of file jump_capable.h.
|
protectedinherited |
Definition at line 107 of file energetic.h.
|
protectedinherited |
Definition at line 108 of file energetic.h.
|
inherited |
Definition at line 45 of file intelligent.h.
|
protectedinherited |
Definition at line 57 of file drawable.h.
|
inherited |
Definition at line 43 of file damageable.h.
|
private |
Definition at line 360 of file unit_generic.h.
| const EnumMap Unit::attribute_map(attribute_names, 3) |
| const EnumMap::Pair Unit::attribute_names[3] |
Definition at line 240 of file objconv/MeshParse/mesh_xml.cpp.
| bool Unit::autopilotactive = false |
Definition at line 278 of file unit_generic.h.
| float Unit::CargoVolume = 0 |
Definition at line 170 of file unit_generic.h.
| float Unit::cloakenergy = 0 |
How much energy cloaking takes per frame.
Definition at line 581 of file unit_generic.h.
| bool Unit::cloakglass = false |
If this unit cloaks like glass or like fading.
Definition at line 585 of file unit_generic.h.
| int Unit::cloaking = -1 |
Definition at line 589 of file unit_generic.h.
| int Unit::cloakmin = cloakglass ? 1 : 0 |
Definition at line 591 of file unit_generic.h.
| int Unit::cloakrate = 100 |
how fast this starship decloaks/close...if negative, decloaking
Definition at line 583 of file unit_generic.h.
| struct collideTrees* Unit::colTrees = nullptr |
Definition at line 839 of file unit_generic.h.
| float Unit::CommFunctionality |
Definition at line 161 of file unit_generic.h.
| float Unit::CommFunctionalityMax |
Definition at line 162 of file unit_generic.h.
|
inherited |
Definition at line 39 of file damageable_object.h.
| Computer Unit::computer |
Definition at line 470 of file unit_generic.h.
|
inherited |
Definition at line 101 of file energetic.h.
|
protected |
Definition at line 141 of file unit_generic.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 46 of file damageable.h.
|
inherited |
Definition at line 69 of file drawable.h.
| unsigned int Unit::damages = Damages::NO_DAMAGE |
Definition at line 237 of file unit_generic.h.
| bool Unit::do_subunit_scheduling = false |
Definition at line 560 of file unit_generic.h.
|
protectedinherited |
Definition at line 60 of file drawable.h.
| int Unit::ecm |
Radar and related systems.
Definition at line 148 of file unit_generic.h.
| const EnumMap Unit::element_map(element_names, 3) |
| const EnumMap::Pair Unit::element_names[3] |
Definition at line 234 of file objconv/MeshParse/mesh_xml.cpp.
Definition at line 92 of file energetic.h.
| float Unit::equipment_volume |
|
inherited |
Definition at line 51 of file damageable_object.h.
| int Unit::faction = 0 |
Definition at line 944 of file unit_generic.h.
| StringPool::Reference Unit::filename |
Definition at line 177 of file unit_generic.h.
| float Unit::fireControlFunctionality |
Definition at line 157 of file unit_generic.h.
| float Unit::fireControlFunctionalityMax |
Definition at line 158 of file unit_generic.h.
| Flightgroup* Unit::flightgroup = nullptr |
Definition at line 938 of file unit_generic.h.
| int Unit::flightgroup_subnumber = 0 |
Definition at line 940 of file unit_generic.h.
| bool Unit::forcejump = false |
if the unit is a wormhole
Definition at line 595 of file unit_generic.h.
|
protectedinherited |
Definition at line 106 of file energetic.h.
|
protected |
Definition at line 982 of file unit_generic.h.
|
inherited |
|
inherited |
Definition at line 51 of file drawable.h.
| float Unit::HeatSink = 0 |
Definition at line 572 of file unit_generic.h.
| float Unit::HiddenCargoVolume = 0 |
Definition at line 173 of file unit_generic.h.
|
inherited |
Definition at line 42 of file damageable.h.
| bool Unit::inertialmode = false |
Definition at line 277 of file unit_generic.h.
|
protectedinherited |
Definition at line 63 of file drawable.h.
| unsigned char Unit::invisible = DEFAULTVIS |
Definition at line 599 of file unit_generic.h.
|
inherited |
|
protectedinherited |
|
inherited |
Definition at line 38 of file damageable_object.h.
| float Unit::LifeSupportFunctionality |
Definition at line 163 of file unit_generic.h.
| float Unit::LifeSupportFunctionalityMax |
Definition at line 164 of file unit_generic.h.
| CollideMap::iterator Unit::location[2] = {nullptr, nullptr} |
Definition at line 838 of file unit_generic.h.
|
protectedinherited |
Definition at line 64 of file drawable.h.
|
inherited |
Definition at line 47 of file damageable.h.
|
inherited |
Definition at line 98 of file energetic.h.
|
inherited |
Definition at line 50 of file drawable.h.
| StringPool::Reference Unit::name |
Definition at line 176 of file unit_generic.h.
| Nebula* Unit::nebula = nullptr |
Definition at line 389 of file unit_generic.h.
| unsigned int Unit::next_repair_cargo |
Definition at line 155 of file unit_generic.h.
| float Unit::next_repair_time |
Definition at line 154 of file unit_generic.h.
|
protectedinherited |
Definition at line 62 of file drawable.h.
|
inherited |
Definition at line 37 of file damageable_object.h.
| void* Unit::owner = nullptr |
Definition at line 555 of file unit_generic.h.
| Pilot* Unit::pilot |
Definition at line 474 of file unit_generic.h.
| UnitImages<void>* Unit::pImage = nullptr |
Definition at line 568 of file unit_generic.h.
|
inherited |
|
inherited |
Definition at line 95 of file energetic.h.
| unsigned char Unit::repair_droid |
Repair.
Definition at line 153 of file unit_generic.h.
|
inherited |
Definition at line 52 of file damageable_object.h.
| enum Unit::schedulepriorityenum Unit::schedule_priority = scheduleDefault |
| bool Unit::selected = false |
Definition at line 475 of file unit_generic.h.
|
inherited |
Definition at line 44 of file damageable.h.
|
inherited |
Definition at line 53 of file damageable.h.
| float Unit::shieldtight = configuration()->physics_config.default_shield_tightness |
Definition at line 576 of file unit_generic.h.
| float Unit::SPECDriveFunctionality |
Definition at line 159 of file unit_generic.h.
| float Unit::SPECDriveFunctionalityMax |
Definition at line 160 of file unit_generic.h.
| float Unit::specInterdiction = 0 |
Definition at line 570 of file unit_generic.h.
| UnitCollection Unit::SubUnits |
Definition at line 263 of file unit_generic.h.
|
inherited |
Definition at line 102 of file energetic.h.
| StringPool::Reference Unit::target_fgid[3] |
Definition at line 775 of file unit_generic.h.
| float Unit::temporary_upgrade_float_variable |
Definition at line 1030 of file unit_generic.h.
|
protectedinherited |
Definition at line 59 of file drawable.h.
|
private |
Definition at line 978 of file unit_generic.h.
|
protectedinherited |
Definition at line 66 of file drawable.h.
|
private |
Definition at line 361 of file unit_generic.h.
|
staticinherited |
Definition at line 71 of file drawable.h.
|
staticinherited |
Definition at line 73 of file drawable.h.
|
inherited |
Definition at line 51 of file damageable.h.
| float Unit::UpgradeVolume = 0 |
Volume.
Definition at line 169 of file unit_generic.h.
|
protectedinherited |
Definition at line 55 of file drawable.h.
|
protectedinherited |
Definition at line 54 of file drawable.h.
|
inherited |
Definition at line 100 of file energetic.h.
| XML* Unit::xml = nullptr |
Definition at line 496 of file unit_generic.h.
1.8.13